package com.markus.basic.设计模式.抽象工厂模式;

/**
 * Author:markusZhang
 * Date:Create in 2020/8/30 11:12
 * todo:
 */
public class Client {
    public static void main(String[] args) {
        AbstractFactory phoneFactory = FactoryProducer.getFactory("phone");
        PhoneProduct xiaomi = phoneFactory.getPhone("xiaomi");
        xiaomi.phone();
        PhoneProduct huawei = phoneFactory.getPhone("huawei");
        huawei.phone();
        AbstractFactory colorFactory = FactoryProducer.getFactory("color");
        ColorProduct red = colorFactory.getColor("red");
        red.fill();
        ColorProduct blue = colorFactory.getColor("blue");
        blue.fill();
    }
}
